//
//  ValuePicker.swift
//  animations
//
//  Created by Ekaterina on 16.01.2023.
//

import SwiftUI

struct ValuePicker: View {
    var title = ""
    var minValue = 0
    var maxValue = 0
    @Binding var value: Int
    
    var body: some View {
        VStack(alignment: .leading, spacing: 4) {
            Text(title)
                .font(.system(size: 16, weight: .semibold))
            Picker(title, selection: $value) {
                ForEach(minValue...maxValue, id: \.self) { number in
                    Text("\(number)").font(.system(size: 16))
                }
            }
            .pickerStyle(.wheel)
            .frame(maxHeight: 100)
        }
    }
}
